Air pollution is a problem. It is getting worse and worse. This is bad for the earth. It is also bad for the health of people. Air pollution is now an issue that the whole world is worried, about. Air pollution is something that we should all be concerned about. We currently check air quality using methods. These methods are not practical for monitoring air quality in time. Here, in this research we present a low-cost IoT-based smart air quality monitoring and prediction system. Data from multiple sensors are used to assess the air quality. These sensors can detect the level of PM2.5 and PM10 in the air. They also measure Carbon Monoxide using the MQ7 sensor and Nitrogen Dioxide using the MQ135 sensor. The Air Quality Index is also affected by the temperature and humidity, around us which are monitored by the Arduino Uno microcontroller. The Air Quality Index is figured out using the parameters I mentioned earlier like the level of PM2.5 and PM10. It follows the method used by the CPCB. The Air Quality Index is determined based on these parameters. Cleaned sensor data is then fed into the system via smoothing and feature scaling to train the model. A one-dimensional CNN model is designed to identify and analyze patterns within the time-series data to predict the AQI. Techniques to handle data are also applied in order to prevent data leakage. Performance metrics such as accuracy, recall, precision and F1 score were used in order to measure the efficacy of the model. A streamlit-based web interface is developed which displays current AQI value, air quality safety status, minute-wise future predictions and health recommendations.
Introduction
This study proposes a smart, low-cost air quality monitoring and prediction system that combines Internet of Things (IoT) sensors, deep learning, and real-time visualization to continuously monitor and forecast air quality.
Background
Air pollution from vehicles, industries, and other human activities has become a serious environmental and health concern. Traditional air quality monitoring systems are expensive and provide limited measurements, making continuous monitoring difficult. To address this issue, the study develops an affordable system capable of both monitoring and predicting the Air Quality Index (AQI) in real time.
Proposed Solution
The system integrates:
IoT-based environmental sensors to collect real-time data.
Machine Learning/Deep Learning techniques, specifically a 1D Convolutional Neural Network (CNN), for AQI prediction.
A Streamlit web dashboard for displaying AQI levels, forecasts, safety indicators, and health recommendations.
Data Collection
The system uses sensors to measure:
PM2.5 and PM10 (dust particles)
Carbon Monoxide (CO) using MQ7 sensor
Nitrogen Dioxide (NO?) and other pollutants using MQ135 sensor
Temperature
Humidity
Sensor data is collected through an Arduino microcontroller and stored in timestamped CSV files.
Data Processing
Before prediction, the collected data undergoes:
Smoothing using rolling averages.
Feature extraction (PM2.5, PM10, CO, NO?).
Min-Max normalization.
Time-series sequence generation for deep learning.
Deep Learning Model
A 1D CNN is used to analyze time-series sensor data and classify air quality into AQI categories. The model includes:
Convolutional layers for feature extraction.
Pooling and batch normalization layers.
Dropout layers to prevent overfitting.
Dense layers for final AQI classification.
AQI Prediction and Health Guidance
The trained CNN predicts AQI in real time and categorizes air quality according to CPCB standards:
Good
Satisfactory
Moderate
Poor
Very Poor
Severe
The system also provides:
Health recommendations
Safety alerts
One-hour ahead AQI forecasts (minute-by-minute)
Dashboard and Visualization
A Streamlit-based web application displays:
Current AQI values
AQI meter and safety status
Sensor readings
AQI trend graphs
Forecasted AQI values
Health advisories
Experimental Results
The system successfully:
Collected and processed real-time environmental data.
Predicted AQI accurately using the CNN model.
Achieved effective integration of IoT sensors, time-series analysis, deep learning, and visualization.
Provided real-time monitoring, forecasting, and decision-support information through an interactive dashboard.
Conclusion
In this research, smart air quality monitoring and predicting system, based on Internet of Things (IoT) and Deep Learning Techniques, was designed and implemented. The system for air quality monitoring through conventional method has a lot of limitations and problems that can be solved by this smart monitoring system. The smart system for air quality monitoring collects data in continuous basis, process the collected data, and analyze the situation around the environment. Some parameters such as particulate matter, gases, humidity, and temperature around the monitoring location can be detected using the sensors attached in the system.
After we gather all the data we need to first process it in order to calculate the Air Quality Index and then feed it into our CNN model to predict the AQI. I also created a simple interface using Streamlit that displays information about the real time status of individual sensors, current AQI value, safety level and trends in a graphical form.
It supports more data aggregations like minute by minute, by time, with safety state information, with an AQI meter and alerts. All common visual widgets like charts and tables are supported, as well as notifications. Experimental results show that the chosen CNN is more accurate than standard machine learning approaches for this task.
References
[1] H.-C. Hsu, G. B. Tarekegn, M. E. Getnet, K.-P. Yu, and L.-C. Tai, “UAV-Based Real-Time Air Quality Monitoring and Prediction Using Machine Learning Approach,” IEEE Internet of Things Journal, 2025.
[2] J. Rosa-Bilbao, F. S. Butt, D. Merkl, M. F. Wagner, J. Schäfer, and J. Boubeta-Puig, “IoT- Based Indoor Air Quality Management System for Intelligent Education Environments,” IEEE Internet of Things Journal, vol. 12, no. 11, 2025.
[3] E. F. Ladeira and B. M. C. Silva, “Machine Learning-Based Decision Support System for Hazardous Gas Monitoring in Rural Areas,” IEEE Access, 2025.
[4] A. M. Ali, A. Al-Qerem, M. R. Hassan, A. Abu-Khadrah, and M. Jarrah, “Traffic Control System for Pollution Control Using Capsule Networks,” IEEE Access, 2025.
[5] N. Silva, E. Alves, W. Júnior, A. Moares, N. Silva, and A. Balieiro, “Real-Time Air Quality Monitoring Using FreeRTOS on ESP32-LoRaWAN IoT Devices in Smart Campus Environments,” IEEE Latin America Transactions, 2025.
[6] A. Mazinani, D. Antonucci, D. P. Pau, L. Davoli, and G. Ferrari, “Air Quality Prediction via Embedded ML/DL and Quantized Models,” IEEE Access, 2025.
[7] S. J. Livingston, S. D. Kanmani, A. S. Ebenezer, D. Sam, and A. Joshi, “Air Quality Prediction Using Ensemble ML Models Combining SVM, RF, ANN, RNN, and Fuzzy Logic,” Measurement: Sensors, Elsevier, 2023.
[8] A. Gangwar, S. Singh, R. Mishra, and S. Prakash, “IoT, Big Data, and Machine Learning Techniques for Air Pollution Monitoring and Forecasting: A Comprehensive Review,” Wireless Personal Communications, Springer, 2023.
[9] S. Al-Eidi, F. Amsa, O. Darwish, Y. Tashtoush, A. Alqahtani, and Niveshitha, “Comparative Study of ML Algorithms for Air Quality Prediction in Smart Cities,” IEEE Access, 2023.
[10] J. Merino, D. Ikeuchi, N. Moretti, A. Mukerjee, L. Li, S. Karatzas, S. Pattinson, and A. Parlikad, “Virtual Sensor Architecture for Indoor Air Quality Monitoring in Manufacturing,”1st Workshop on Low-Cost Digital Solutions for Industrial Automation (LoDiSA,2023),IET, 2023.
[11] J. Mabrouki, M. Azrour, D. Dhiba, Y. Farhaoui, and S. El Hajjaji, “IoT-Based Data Logger for Weather and Air Quality Monitoring,” Big Data Mining and Analytics, KeAi / Elsevier, 2021.
[12] C. C. Goh et al., “In-Vehicle Air Quality Monitoring System Using Machine Learning Models,” Sensors (MDPI), 2021.
[13] D. Zhang and S. S. Woo, “Hybrid IoT Sensing Network for Air Quality Monitoring Using Fixed and Mobile Sensors,” IEEE Access, 2020.
[14] D. Iskandaryan, F. Ramos, and S. Trilles, “Machine Learning Techniques for Air Quality Prediction in Smart Cities: A Comparative Study,” Applied Sciences (MDPI), 2020.
[15] B. Wang, W. Kong, H. Guan, and N. N. Xiong, “A Two-Layer Hybrid LSTM–GRU Model for PM2.5 Prediction and Smog Forecasting,” IEEE Access, 2019.
[16] K. B. K. Sai, S. Ramasubbareddy, and A. K. Luhach, “IoT-Based Air Quality Monitoring System Using ThingSpeak and ML Analysis,” Scalable Computing: Practice and Experience (SCPE), 2019.
[17] A. Mishra, “IoT-Based Air Pollution Monitoring System Using Machine Learning Models,” Proc. 2018 Int. Conf. on Applied Electromagnetics, Signal Processing and Communication (AESPC), IEEE, 2018.
[18] T. W. Ayele and R. Mehta, “IoT-Based Air Pollution Monitoring and Prediction Using LSTM,”Proc. 2nd Int. Conf. on Inventive Communication and Computational Technologies(ICICCT), IEEE, 2018.
[19] G. K. Kang, J. Z. Gao, S. Chiao, S. Lu, and G. Xie, “Big Data and Machine Learning Approaches for Air Quality Prediction,” Int. Journal of Environmental Science and Development(IJESD), 2018.
[20] V. H. Khandekar and P. Srinath, “Comparative Analysis of ML Techniques for Air Quality Forecasting,” Proc.2017 int. Conf. on Computing, Communication, Control and Automation(ICCUBEA), IEEE, 2017.